﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
	<meta charset="utf-8" />
</head>
<body>
    <video autoplay="autoplay" id="test_video" height="400" width="400"></video>
    <script type="text/javascript">
        navigator.getMedia = (navigator.getUserMedia ||
                      navigator.webkitGetUserMedia || navigator.mozGetUserMedia ||
                      navigator.msGetUserMedia);
        if (navigator.getMedia) {
            navigator.getMedia(
           {
               video: true,
               audio: true
           },
            function (stream) {
                var s = window.URL.createObjectURL(stream);
                var video = document.getElementById('test_video');
                video.src = window.URL.createObjectURL(stream);
            }, function (err) {
                console.log("The following error occured:" + err);
            })
        }
    </script>
</body>
</html>
